home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1996 / MacHack 1996.toast / Hacks / Hacks ’87 / Source ƒ.sit / Source ƒ / XLISP ƒ / xlisp 1.7 doc ƒ / fact.lsp next >
Encoding:
Lisp/Scheme  |  1995-09-10  |  84 b   |  4 lines

  1. (defun factorial (n)
  2.        (cond ((= n 1) 1)
  3.          (t (* n (factorial (- n 1))))))
  4.